docs: unify chart dimension settings into shared snippets (#4773)#7031
Conversation
Single-source the bucket dimension "Data" settings (Top values, Date histogram, Intervals, Filters, and Collapse by) shared across Lens chart types into reusable snippets, and bring each page up to standard against the Kibana source: - Add bucket-function snippets and a Collapse by snippet under explore-analyze/_snippets/. - Rewire pie, waffle, treemap, mosaic, heat map, tag cloud, table, bar, line, area, and metric pages to include them. - Add the Filters function to heat map axes and the full function set to the metric breakdown, which were missing. - Place Collapse by once per dimension and only where the UI exposes it (partition dimensions, XY/metric breakdown, table rows). - Neutralize partition-specific wording in the shared advanced-settings snippet so it reads correctly on every chart type. Co-authored-by: Cursor <cursoragent@cursor.com>
Elastic Docs AI PR menuCheck the box to run an AI review for this pull request.
Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team. |
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
Reduce the number of near-identical snippets:
- Merge lens-bucket-top-values and its -secondary variant into one
snippet. The legacy (9.0-9.3) default now states the real rule
("5 for the first dimension and 3 for each additional dimension")
instead of approximating it across two files.
- Point area chart vertical-axis settings at the shared
lens-value-advanced-settings snippet (verified the XY metric options
against Kibana) and remove the redundant area-only variant, which was
an incomplete duplicate.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
@copilot can you just make sure all the right chunks of prose have been replaced with their concomitant snippets? |
Verified — all inline bucket-dimension prose (Top values, Date histogram, Intervals, Filters, Collapse by) has been replaced with the corresponding snippet includes on every page listed in the PR:
No leftover inline descriptions remain, and the snippets are correctly absent from gauge and region map pages. |
There was a problem hiding this comment.
Docs review summary
Focus areas
- Style and clarity: Good. The single-sourcing approach is clean and the new snippet prose is concise and active. Two wording concerns flagged inline.
- Jargon:
KQLappears unexplained inlens-bucket-filters.md("Define custom KQL filters"), but this was present in the pre-existing per-chart wording, not introduced by this PR. - Frontmatter and applies_to: All changed chart pages retain correct frontmatter. The
applies_tousage inlens-bucket-top-values.mdis structurally valid. - Content type fit: All pages remain how-to guides with appropriate structure. No regressions.
- Parent issue satisfaction: Satisfied. #4773 asked for single-sourced bucket dimension settings; the PR delivers shared snippets covering Top values, Date histogram, Intervals, Filters, and Collapse by, and updates all 11 affected chart pages consistently.
Nits
metric-charts.md(breakdown section, ~line 493): The old text had a metric-specific note — "an additional tile named Other shows if the Group remaining values as 'Other' advanced option is on" — that made the tile-creation behavior explicit. The sharedlens-breakdown-advanced-settings.mdsnippet says "On by default" but skips this visual effect. Low impact since "tiles" are established earlier on the page, but worth considering a one-liner addition specific to metric charts.metric-charts.md(old Collapse by): The removed text listed `None` as the default option — useful for users who want to revert a previously set aggregation. The new generic snippet omits it. IfNoneis selectable in the UI, consider documenting it or noting how to disable an active Collapse by setting.area-charts.mdline 188 (pre-existing, not introduced by this PR): The Breakdown Appearance section still reads "Allow you to customize how your breakdown data is displayed in line charts" — this should say "area charts".tag-cloud-charts.md: "For best legibility, display 20 to 50 tags." — "display" reads slightly awkwardly here; "use" is more natural for guidance ("For best legibility, use between 20 and 50 tags.").
Notes
- Vale returned zero findings against the 18 eligible files.
- Snippet files do not need frontmatter; this is consistent with the rest of the
_snippets/directory. - The indentation difference between snippet includes (4 vs. 6 spaces for rank-by and histogram-settings) is pre-existing convention and not changed by this PR.
Generated by Docs review agent for issue #7031 · 108.9 AIC · ⌖ 9.22 AIC · ⊞ 10.7K
leemthompo
left a comment
There was a problem hiding this comment.
Words LGTM and the robots verified the snippet includes are all executed as intended.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
This PR addresses #4773 by single-sourcing the bucket dimension Data settings that Lens chart types share (Top values, Date histogram, Intervals, Filters, and Collapse by) into reusable snippets, and by bringing each page up to standard against the Kibana source so the lists are exhaustive and accurate.
Each page now shows only the functions that its dimensions actually support, with the same wording sourced from one place.
New snippets (
explore-analyze/_snippets/)lens-bucket-top-values.md: the Top values function. The default count is verified against source:9on {applies_to}stack: ga 9.4/serverless, and onstack: 9.0-9.3it defaults to5for the first dimension and3for each additional dimension.lens-bucket-date-histogram.md,lens-bucket-intervals.md,lens-bucket-filters.md: the remaining bucket functions.lens-collapse-by.md: the dimension-level Collapse by control.Pages rewired to include the snippets
pie-charts.md,waffle-charts.md,treemap-charts.md,mosaic-charts.md)heat-map-charts.md,tag-cloud-charts.md,tables.mdbar-charts.md,line-charts.md,area-charts.md)metric-charts.mdAccuracy fixes made while single-sourcing (verified against
elastic/kibanaat HEAD)isBucketed, so Filters applies but was undocumented).isBucketedpredicate.Snippet consolidation
lens-value-advanced-settings.mdsnippet and removed the area-only variant, which was an incomplete duplicate of the same XY metric options.Resolves
Closes #4773